<!DOCTYPE html>
<html lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>主号验证</title>
    <meta charset="UTF-8">
    <title>主号验证</title>
    <meta name="keywords" content="主号验证"/>
    <meta name="description" content="主号验证"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport" content="width=device-width,viewport-fit=cover">
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <meta name="_csrf_header"  th:content="${_csrf.headerName}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/shoppingApi/css/public.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/shoppingApi/css/publicOfuser.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/shoppingApi/css/combtn.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/shoppingApi/css/switchvarify.css}">
</head>
<body>

<div class="main bgfff">
    <div class="main_con c323232">
        <div class="mt125 mr15 ml15">

            <ul>
                <li>
                    <div class="clearfix input_border_bottom_focused">
                        <img class="ml15 fl" src="/shoppingApi/images/login_by_account_checked.png"
                             style="width: 16px;height: 20px;">
                        <div class="overflow pr15 pl15">
                            <input class="ft15 c969696  w100" id="userno" placeholder="请输入用户名" type="text">
                        </div>
                    </div>
                </li>

                <li>
                    <div class="clearfix mt30 input_border_bottom_normal">
                        <img class="ml15 fl" src="/shoppingApi/images/login_by_account_normal.png" style="width: 16px;height: 22px;">
                        <div class="overflow pr15 pl15">
                            <input class="ft15 c969696  w100" id="pwd" placeholder="请输入密码" type="password">
                        </div>
                    </div>
                </li>

                <li>
                    <div><a href="#" class="submit mt40 bigrounded button red">确定</a></div>
                </li>
            </ul>
        </div>
    </div>
</div>


</body>
<script th:src="@{/shoppingApi/js/jquery-3.3.1.min.js}"></script>
<script th:src="@{/shoppingApi/js/common.js}"></script>
<script type="application/javascript">
    var header = $("meta[name='_csrf_header']").attr("content");
    var token =$("meta[name='_csrf']").attr("content");
    $(".bigrounded").on('click',function () {
        var userno=$("#userno").val();
        var pwd=$("#pwd").val();
            $.ajax({
                url: '/API/user/ChangeUserPhone?userNo='+userno+"&pwd="+pwd,
                type: 'post',
                dataType: 'json',
                contentType: 'application/json',
                async: false,
                success: function(data){
                    if(data.stat==100)
                    {
                        window.location=location;
                    }
                    else {
                        alert("失败!");
                    }
                },
                beforeSend : function(xhr) {
                    xhr.setRequestHeader(header, token);
                }
            });
    })

</script>
</html>